﻿#define _CRT_SECURE_NO_WARNINGS 1

//编程初学者入门训练第十七题
//BC19 反向输出一个四位数
//https://www.nowcoder.com/practice/1f7c1d67446e4361bf4af67c08e0b8b0?tpId=107&tqId=33300&rp=1&ru=/exam/oj/ta&qru=/exam/oj/ta&sourceUrl=%2Fexam%2Foj%2Fta%3FtpId%3D107&difficulty=undefined&judgeStatus=undefined&tags=&title=

#include <stdio.h>

int main() {
    int num = 0;
    int a = 0;
    int b = 0;
    int c = 0;
    scanf("%d", &num);

    c = num % 10;
    num /= 10;
    b = num % 10;
    num /= 10;
    a = num % 10;
    num /= 10;

    printf("%d%d%d%d", c, b, a, num);
    return 0;
}